
public class pArrayStackInt
{
   public pArrayStackInt(int capacity)
   {
      capacity1 = capacity;
      head = new int[capacity];
      pointer = -1;
   }
   public boolean isEmpty()
   {
      return pointer == -1;
   }
   public void push(int i)
   {
      if(pointer+1 < head.length)
         head[++pointer]=i;
   }
   public int pop()
   {
      if(isEmpty())
         return 0;
      return head[pointer--];
   }
   public boolean isFull()
   {
      return pointer == (capacity1-1);
   }
   private int capacity1;
   protected int head[];
   protected int pointer;
}
